#pragma once
#include"List_node.h"

template <typename T>
class List_iterator {
public:
	List_iterator(List_node<T>* node) :current(node) {};
	List_iterator() :current(nullptr) {};

	void operator++() {  current = current->next; }
	void operator --() {  current = current->privious; }
	bool operator != (List_iterator<T> other) { return current != other.current; }
	bool operator == (List_iterator<T> other) { return current == other.current; }
	bool operator <= (List_iterator<T> other) { return current <= other.current; }
	bool operator >= (List_iterator<T> other) { return current >= other.current; }
	bool operator < (List_iterator<T> other) { return current < other.current; }
	bool operator > (List_iterator<T> other) { return current > other.current; }
	T& operator * () { return current->data; }

private:
	List_node<T>* current;
};
